<?xml version='1.0' encoding='UTF-8' ?>
<!--
    Document   : baseProperty
    Created on : Jan 28, 2012, 12:14:06 PM
    Author     : Oscar Ivan Prado
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:icecore="http://www.icefaces.org/icefaces/core"
                xmlns:ace="http://www.icefaces.org/icefaces/components"
                xmlns:ice="http://www.icesoft.com/icefaces/component"
                xmlns:c="http://java.sun.com/jsp/jstl/core">

    <ice:panelGroup rendered="#{!authenticationBackingBean.authenticated}">
        <a onclick="document.getElementById('authentication:login').click()">LOGIN</a>
    </ice:panelGroup>
    <ice:panelGroup rendered="#{authenticationBackingBean.authenticated}">
        <a onclick="document.getElementById('authentication:logout').click()">LOGOUT</a>
    </ice:panelGroup>
    <ice:form id="authentication">
        <ice:commandButton id="login" style="display: none;" actionListener="#{authenticationBackingBean.initLogin()}"/>
        <ice:commandButton id="logout" style="display: none;" actionListener="#{authenticationBackingBean.logout()}"/>
        <ice:panelPopup visible="#{authenticationBackingBean.authenticationPopup}" modal="true">
            <f:facet name="body">
                
                        <ice:panelGroup>
                            <center style="padding-bottom: 4px">
                                <table>
                                    <tr>
                                        <td align="left">
                                            <ice:outputLabel value="#{i18n['login.username']}" styleClass="label"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <ice:inputText styleClass="text-medium" value="#{authenticationBackingBean.userName}"/>
                                        </td>
                                    </tr>
                                    <tr align="left">
                                        <td>
                                            <ice:outputLabel value="#{i18n['login.password']}" styleClass="label"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <ice:inputSecret styleClass="text-medium" value="#{authenticationBackingBean.password}"/>
                                        </td>
                                    </tr>
                                </table>
                            </center>
                            <center>
                                <table cellpadding="2">
                                    <tr>
                                        <td>
                                            <ice:commandButton value="#{i18n['login.button.login']}" actionListener="#{authenticationBackingBean.authenticate()}" styleClass="button-submit "/>
                                        </td>
                                        <td>
                                            <ice:commandButton value="#{i18n['login.button.cancel']}" actionListener="#{authenticationBackingBean.cancel()}" styleClass="button-submit "/>
                                        </td>
                                    </tr>
                                </table>
                            </center>
                        </ice:panelGroup>
                
            </f:facet>
        </ice:panelPopup>

    </ice:form>
</ui:composition>